﻿@{
    Layout = null;
}
@model dynamic
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>@ElingOA6_Admin_DSJCJ.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
        <script src="../../Scripts/json2.js" type="text/javascript"></script>  
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery.signalR-0.5.3.js")" type="text/javascript"></script>

    <script src="@Url.Content("~/signalr/hubs")" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(
        new StyleSheet { ExtensionType = ExtensionType.Splitter, Theme = DevExpressHelper.Theme }

)
    @Html.DevExpress().GetScripts(
            new Script { ExtensionType = ExtensionType.Splitter }
    )
    <style type="text/css">
        body
        {
            margin: 0px;
            font-size: 12px;
            color: #FFFFFF;
        }
        span
        {
            margin-right: 20px;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function () {
            var connection = $.connection(rootPath + '/echo');
            connection.received(function (data) {
                var msg = new String(data);
                var index = msg.indexOf("#");
                var msgCount = msg.substring(0, index);
                if (msgCount != 0) {
                    var popupZone = ASPxClientPopupControl.Cast("popupZone");
                    if (msgCount == 20) {
                        msgCount = 20; //最大20条
                    }
                    popupZone.SetHeight(msgCount * 15 + msgCount * 15); //加上<br/>间隔
                    popupZone.SetWidth(300);
                    var content = msg.substring(index + 1);
                    writeEvent(content);
                }
            });

            connection.start();

            /*消息输出*/
            function writeEvent(eventLog) {
                var popupZone = ASPxClientPopupControl.Cast("popupZone");
                popupZone.Hide();
                popupZone.SetContentHTML(eventLog);
                var left = window.screen.width;
                var top = screen.height + popupZone.GetHeight()
                popupZone.SetHeaderText("消息提醒");
                popupZone.ShowAtPos(left, top);
                popupZone.UpdatePosition();
                window.setTimeout("popupZone.Hide();", 40000);
            }

            window.status = ' ';
        });
    </script>

</head>
<body>
    @Html.DevExpress().Splitter(settings =>
{
    settings.Name = "MainSplitter";
    settings.AllowResize = false;
    settings.Orientation = System.Web.UI.WebControls.Orientation.Vertical;
    settings.FullscreenMode = true;
    settings.SeparatorVisible = false;
    settings.Styles.Pane.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Pane.Paddings.Padding = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Panes.Add(pane =>
    {
        pane.Name = "Header";
        pane.Size = System.Web.UI.WebControls.Unit.Pixel(76);
        pane.MinSize = System.Web.UI.WebControls.Unit.Pixel(76);
        pane.PaneStyle.BorderBottom.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
        pane.PaneStyle.CssClass = "headerPane";
        pane.SetContent("<iframe  id='contenttop' name='contenttop' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("Top", "Index") + "' scrolling='no'></iframe>");

    });

    settings.Panes.Add(pane =>
    {
        pane.Name = "Content";
        pane.PaneStyle.CssClass = "mainContentPane";
        pane.MinSize = System.Web.UI.WebControls.Unit.Pixel(375);
        pane.PaneStyle.BackColor = System.Drawing.Color.White;
        pane.PaneStyle.BorderBottom.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
        pane.SetContent(@RenderBody().ToHtmlString());
    });

    settings.Panes.Add(pane =>
    {
        pane.Name = "Footer";
        pane.Size = System.Web.UI.WebControls.Unit.Pixel(31);
        pane.MinSize = System.Web.UI.WebControls.Unit.Pixel(31);
        pane.PaneStyle.CssClass = "footerPane";
        //pane.SetContent("<iframe  id='contentbuttom' name='contentbuttom' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("Buttom", "Index") + "'></iframe>");
        pane.SetContent(Html.Action("Buttom", "Index").ToHtmlString());

    });
}).GetHtml()
</body>
</html>
